//
//  HSStarView.h
//  customer
//
//  Created by Holothurian on 2018/11/10.
//  Copyright © 2018年 yinlong. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class HSStarView;

@protocol HSStarViewDelegate <NSObject>

- (void)starView:(HSStarView *)starView scroePercentDidChange:(CGFloat)newScorePercent;

@end

@interface HSStarView : UIView

/**
 //得分值，范围为0--1，默认为1
 */
@property (nonatomic, assign) CGFloat scorePercent;

/**
 //是否允许动画，默认为NO
 */
@property (nonatomic, assign) BOOL hasAnimation;

/**
 //评分时是否允许不是整星，默认为NO
 */
@property (nonatomic, assign) BOOL allowIncompleteStar;

@property (nonatomic, weak) id<HSStarViewDelegate>delegate;

- (instancetype)initWithFrame:(CGRect)frame numberOfStars:(NSInteger)numberOfStars;

@end

NS_ASSUME_NONNULL_END
